package com.breakfast.fun.util;

import android.app.Dialog;
import android.content.Context;

import com.breakfast.fun.view.widget.CustomsDialog;
import com.breakfast.fun.R;

public class DialogUtil {
    private Context context;

    public DialogUtil(Context context) {
        super();
        this.context = context;
    }

    /**
     * 获取加载中对话框
     *
     * @param tip
     * @param isCanClose
     * @return
     */
    public Dialog getWaitDialog(String tip, Boolean isCanClose) {
        CustomsDialog dialog = new CustomsDialog(context, R.style.dialogBase);
        dialog.setTipText(tip);
        dialog.setCanceledOnTouchOutside(isCanClose);
        dialog.setCancelable(true);
        dialog.show();
        return dialog;
    }

}
